<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php $this->load->view('include/html_head')?>
</head>
<body>
<div id="wrapper">
	<?php $this->load->view('include/header')?>
	<?php $this->load->view('include/menu')?>
	<div id="page">
		<div id="content">
		<?php $this->load->view('include/sub_navi')?>
			<div class="post">
				<p class="meta">新闻列表</p>
				<div class="entry">
				<?php if (!empty($news_list)):?>
				<table class='full'>
				<caption><?php echo "包括未发布的新闻草稿，您还能写<span class='remaining_count'>" . $remaining_count . "</span>条新闻"?></caption>
				<thead>
			 		<tr>
			 			<th>新闻标题</th>
			 			<th style="text-align:center;">修改时间</th>
			 			<th style="text-align:center;">状态</th>
			 			<th style="text-align:center;">维护</th>
			 		</tr>
			 	</thead>
			 	<tbody>
			 		<?php foreach ($news_list as $v):?> 
			 		<tr>
			 			<td><a class='list_title' title='<?php echo $v['title']?>' href='<?php echo BACKEND_SOCIETY_NEWS_PREVIEW_PATH . $v['id']?>'><?php echo ellipsize($v['title'], 20, 1)?></a></td>
			 			
			 			<?php if (empty($v['update_time'])):?>
			 			<td style="text-align:center; width:110px;"><?php echo date("y/m/d H:i", $v['create_time'])?></td>
			 			<?php else :?>
			 			<td style="text-align:center; width:110px;"><?php echo date("y/m/d H:i", $v['update_time'])?></td>
			 			<?php endif;?>
			 			
			 			<td style="text-align:center; width:45px;"><?php echo $this->common_data->_get_news_announcement_status_by_cid($v['is_published'])?></td>
						<td style="text-align:center; width:30px;"><span><a class='view' title='查看' href='<?php echo BACKEND_SOCIETY_NEWS_PREVIEW_PATH . $v['id']?>'></a><a class='modify' title='修改' href='<?php echo BACKEND_SOCIETY_NEWS_EDIT_PATH . $v['id']?>'></a><a style='cursor: pointer;' id='<?php echo $v['id']?>' class='delete news' title='删除' ></a></span></td>
				 	</tr>
				 	<?php endforeach?>
				 	</tbody>
				</table>
				<?php endif;?>
				<?php if (empty($news_list)):?>
				<span class='tip'>目前暂无新闻发布</span>
				<?php endif;?>
				<a class='anchor_button' href="<?php echo BACKEND_SOCIETY_NEWS_EDIT_PATH ?>" >添加新闻</a>
				<a class='anchor_button' onclick="history.back(-1);" >返回</a>
				</div>
			</div>
			<div style="clear: both;">&nbsp;</div>
		</div>
		<!-- end #content -->
		<?php $this->load->view('include/side_bar')?>
		<div style="clear: both;">&nbsp;</div>
	</div>
	<!-- end #page -->
</div>
<?php $this->load->view('include/footer_content')?>
<?php $this->load->view('include/footer')?>
</body>
</html>
